<h3 class="page-title">车辆媒体查询</h3>
<div class="portlet">
	<div class="portlet-title">
		<div class="title-blank">
        	<span ng-repeat="media in mediaTypes" style="margin-right: 15px;">
        		<input type="radio" name="mediaType" ng-checked="media.mediaId == mediaResourceGrid.mediaType" style="position: static;margin: 0px;" ng-click="mediaResourceGrid.initDynamicTable(media.mediaId,media.modelType)">
        		{{media.mediaName}}
        	</span>
		</div>
		<a href="javascript:void(0);" class="title-operation search-expand">筛选</a>
		<div class="title-search-box">
			<input type="text" placeholder="请输入小自编号" class="search-field" ng-model="mediaResourceGrid.query.vehicleNoAbbr"
				   style="width: 180px;" maxlength="100">
			<a class="fa fa-search" ng-click="mediaResourceGrid.initDynamicTable(mediaResourceGrid.mediaType,mediaResourceGrid.modelType);"></a>
		</div>
	</div>
	<div class="portlet-search-body" style="display: none">
		<form class="form-horizontal" role="form" style="margin: 2px;">
			<div class="form-body">
				<div class="row" style="margin-bottom: 5px;">
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<input class="form-control" placeholder="车牌号" ng-model="mediaResourceGrid.query.plateNo">
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<input class="form-control" placeholder="自编号" ng-model="mediaResourceGrid.query.vehicleNo">
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<input class="form-control" placeholder="线路" ng-model="mediaResourceGrid.query.lineNo">
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.companyId" ng-options="opt.companyId as opt.companyName for opt in companys">
								<option value="" >--营运公司-- </option>
							</select>
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.busType" ng-options="opt.typeCode as opt.typeName for opt in busTypes">
								<option value="" >--车型-- </option>
							</select>
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.busFloor" ng-options="opt.value as opt.name for opt in options.BUS_FLOOR">
								<option value="" >--双巴-- </option>
							</select>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.airConditioned" ng-options="opt.value as opt.name for opt in options.BUS_AIRCONDITIONED">
								<option value="" >--空调-- </option>
							</select>
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.busEnergy" ng-options="opt.value as opt.name for opt in options.BUS_ENERGY">
								<option value="" >--能源-- </option>
							</select>
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.businessType" ng-options="opt.value as opt.name for opt in options.BUS_BUSINESSTYPE">
								<option value="" >--营运方式-- </option>
							</select>
						</div>
					</div>
					
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<select class="form-control" style="color: #b3b3b3;" ng-model="mediaResourceGrid.query.customerId" ng-options="opt.customerId as opt.customerName for opt in customerList">
								<option value="" >--经营单位 --</option>
							</select>
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<input class="form-control" placeholder="合同号" ng-model="mediaResourceGrid.query.contractNo">
						</div>
					</div>
					<div class="col-md-2" ng-show="mediaResourceGrid.modelType != undefined && mediaResourceGrid.modelType != '' && mediaResourceGrid.modelType == '1'">
						<div class="input-icon">
							<i class="fa fa-bus"></i>
							<input class="form-control" placeholder="广告内容" ng-model="mediaResourceGrid.query.content" >
						</div>
					</div>
					<div class="col-md-2">
						<div class="input-icon" ng-style="{'padding-top': mediaResourceGrid.modelType == '1' ? '5px' : '0' }">
							<button class="btn btn-primary" ng-click="mediaResourceGrid.initDynamicTable(mediaResourceGrid.mediaType,mediaResourceGrid.modelType);">
								<i class="fa fa-search"></i> 搜索
							</button>
							<button class="btn btn-primary" ng-click="reset()">
								<i class="fa fa-rotate-left"></i> 重置
							</button>
						</div>
					</div>
				</div>
			</div>


		</form>
	</div>
	<div class="portlet-body">
		<div ed-grid-dynamic="mediaResourceGrid" ed-url="media/resource/bus/query.do" style="width: 100%;"></div>
	</div>
</div>

<div ed-modal="busLineModal" data-options="title:'车辆定位',icon:'fa-bus',static:true,width:'1100px',defaultButton:false">
	<div id="busLineModalMapDiv" style="overflow: auto;height: 600px;width: 100%;">
	</div>
</div>

<div ed-modal="busMediaInfoModal" data-options="title:'车辆信息',icon:'fa-bus',static:true,width:'900px',defaultButton:false">
	<div class="form" style="overflow: auto;height: 500px;">
		<form action="#" class="form-horizontal form-row-seperated w5c-form" w5c-form-validate novalidate name="busMediaForm">
			<div class="form-body">
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="col-md-2 control-label">车&nbsp; 牌&nbsp;号：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.plateNo}}</p>
							</div>
							<label class="col-md-2 control-label">自&nbsp; 编&nbsp;号：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.vehicleNo}}</p>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="col-md-2 control-label">车辆线路：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.lineNo}}</p>
							</div>
							<label class="col-md-2 control-label">营运公司：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.companyName}}</p>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="col-md-2 control-label">车　　型： </label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.busType}}</p>
							</div>
							<label class="col-md-2 control-label">单&nbsp; 双&nbsp;层 ：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.busFloor}}</p>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="col-md-2 control-label">上线年限： </label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.onlineDate}}</p>
							</div>
							<label class="col-md-2 control-label">营运方式 ：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.businessType}}</p>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="col-md-2 control-label">空　　调： </label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.airConditioned}}</p>
							</div>
							<label class="col-md-2 control-label">能　　源 ：</label>
							<div class="col-md-4">
								<p class='form-control-static'>{{mediaBus.busEnergy}}</p>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="col-md-2 control-label">照　　片：</label>
							<div class="col-md-10">
								<div class="mix-grid" style="display: inline;" ng-repeat="img in mediaBus.busImgs">
			                    	<div class="mix" style="display: inline-block;opacity: 1;padding-right: 5px;">
			                    		<div class="mix-inner">
											<img class="img-responsive" ng-src="{{nginxPath+img.path}}" alt="" style="width:150px;height:120px">
											<div class="mix-details" style="height:50%;">
												<a class="mix-preview fancybox-button" style="position: static;display: inline-block;" ng-href="{{nginxPath+img.path}}" data-rel="fancybox-button">
													<i class="fa fa-search"></i>
												</a>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
		</form>
	</div>
</div>

<div ed-tips="pictureViewTip" data-options="direction:'right',width:'300px'" >
	<div style="padding:7px 0px 7px 0;height: 100%;" >
		<img id="pictureViewArea" alt="暂无图片" src="" height="200px" width="200px" style="clear: both; display: block; margin:auto;text-align: center"/>
	</div>
</div>

<div ed-modal="resourceInfoModal" data-options="title:'资源明细',icon:'fa-bus',static:true,width:'900px',defaultButton:false">
	<div style="padding: 5px;width: 100%;overflow: auto;height:500px;">
		<div class="portlet">
			<div class="portlet-body">
				<tabset>
					<tab heading="广告刊载">
						<div class="portlet">
							<div class="portlet-body">
								<table ed-grid="resourceAdsGrid" ed-url="media/resource/ads.do"class="table table-striped table-bordered table-hover dataTable" style="width: 100%;">
									<thead>
									<tr>
										<th ed-data="_index"></th>
										<th ed-data="content">广告内容</th>
										<th ed-data="customerName">经营单位</th>
										<th ed-data="billNo">上刊单号</th>
										<!--<th ed-data="publishTime">广告起始时间</th>-->
										<!--<th ed-data="publishOffTime">广告终止时间</th>-->
									</tr>
									</thead>
								</table>
							</div>
						</div>
					</tab>
					<tab heading="经营权属">
						<div class="portlet">
							<div class="portlet-body">
								<table ed-grid="resourceRightsGrid" ed-url="media/resource/rights.do" class="table table-striped table-bordered table-hover dataTable" style="width: 100%;">
									<thead>
									<tr>
										<th ed-data="_index"></th>
										<th ed-data="contractNo">合同编号</th>
										<th ed-data="customerName">广告所属单位</th>
										<th ed-data="startDate">经营起始时间</th>
										<th ed-data="endDate">经营终止时间</th>
									</tr>
									</thead>
								</table>
							</div>
						</div>
					</tab>

					<tab heading="资源详情">
						<div class="portlet">
							<div class="portlet-body">
								<table  class="table table-striped table-bordered table-hover dataTable" style="width: 70%;margin-left: 16%;">
									<thead>
										<tr>
											<th style="text-align: center;width: 30%">数据项</th>
											<th style="text-align: center;width: 70%">数据值</th>
										</tr>
									</thead>
									<tbody>
										<tr ng-repeat="item in resourceItemHead" style="text-align: center">
											<td>{{item.name}}</td>

											<td ng-show="item.type == 'STRING' || !item.type" ng-style="{'border-bottom':'1px solid #ddd','border-right':'none'}">{{resourceItemData[item.col]}}</td>
											<td ng-show="item.type == 'CODE'" >{{resourceItemData[item.col] | code : item.code }} </td>
											<td ng-show="item.type == 'showImg' && {{resourceItemData[item.col] != undefined && resourceItemData[item.col] != ''}}" style="border-top: 0px;">
												
												<div class="mix-grid" style="display: block;">
							                    	<div class="mix" style="display: inline-block;opacity: 1;padding-right: 5px;">
							                    		<div class="mix-inner">
															<img class="img-responsive" ng-src="{{nginxPath + resourceItemData[item.col]}}" style="width:150px;height:120px">
															<div class="mix-details" style="height:50%;">
																<a class="mix-preview fancybox-button"  style="position: static;display: inline-block;" ng-href="{{nginxPath+resourceItemData[item.col]}}" data-rel="fancybox-button">
																	<i class="fa fa-search"></i>
																</a>
															</div>
														</div>
													</div>
												</div>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
					</tab>

				</tabset>
			</div>
		</div>
	</div>
</div>